import React, { Component } from 'react';

const propsProxyHoc = WrappedComponent => class extends Component {
  constructor() {
    super();
    this.state = {
      username: '高阶-username-state(属性代理)'
    }
  }
  handleClick() {
    console.log('click,');
  }

  render() {
    const { state, props } = this
    return (
      <WrappedComponent
        {...this.props} handleClick={this.handleClick} username={state.username}
      />);
  }
};
export default propsProxyHoc;
